
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutternettest/pages/home_page.dart';
import 'package:flutternettest/pages/login_page.dart';
import 'package:flutternettest/pages/regist_page.dart';

class Routers{

  static final String loginPagePath = '/login';
  static final String registPagePath = '/regist';
  static final String homePagePath = '/home';

  static Handler loginHandler = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params){
      return LoginPage();
    }
  );
  static Handler registHandler = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params){
      return RegistPage();
    }
  );
  static Handler homeHandler = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params){
      return HomePage();
    }
  );

  static void configRouters(Router router){

    router.define(loginPagePath, handler: loginHandler);
    router.define(registPagePath, handler: registHandler);
    router.define(homePagePath, handler: homeHandler);

  }

}